{if $action == ""}
{if $numcats > 0}
<h2>Forum Categories</h2>
<table width="100%" border="0" cellspacing="1" cellpadding="4" align="center" class="table">
	  <tr>
		<th width="10%" class="smallhead">Action</th>
		<th class="smallhead">Category</th>
        <th class="smallhead" width="10%">Position</th>
	  </tr> 
	 {section name=catloop loop=$numcats}
		 <tr>
			<td class="text"><a href="{$pagename}&amp;action=view&amp;cid={$cats[catloop].id}"><img src="{$tempdir}admin/images/mod.gif" border="0" alt="View {$cats[catloop].name} forums" title="View {$cats[catloop].name} forums" /></a> - <a href="{$pagename}&amp;action=edit&amp;cid={$cats[catloop].id}"><img src="{$tempdir}admin/images/edit.gif" border="0" alt="Edit {$cats[catloop].name}" title="Edit {$cats[catloop].name}" /></a> - <a href="{$pagename}&amp;action=delete&amp;cid={$cats[catloop].id}"><img src="{$tempdir}admin/images/delete.gif" border="0" alt="Delete {$cats[catloop].name}" title="Delete {$cats[catloop].name}" /></a></td>
			<td class="text">{$cats[catloop].name}</td>
            <td class="text">{if $smarty.section.catloop.iteration != 1}<a href="{$pagename}&amp;action=moveup&amp;cid={$cats[catloop].id}"><img src="{$tempdir}admin/images/up.gif" border="0" alt="Up" title="Move Up" /></a>&nbsp;{/if}{if $smarty.section.catloop.iteration != $numcats}<a href="{$pagename}&amp;action=movedown&amp;cid={$cats[catloop].id}"><img src="{$tempdir}admin/images/down.gif" border="0" alt="Up" title="Move Down" /></a>{/if}</td>
	  </tr>
	  {/section}
	</table>
    {else}
<div align="center">No forum categories</div>
{/if}
    <div align="left"><input type="button" class="button" onclick="window.location = '{$pagename}&amp;action=add';" value="Add Category" /></div>
  {elseif $action == "view"}
  {if $numforums > 0}
  <h2>Forums in {$catinfo.name}</h2>
<table width="100%" border="0" cellspacing="1" cellpadding="4" align="center" class="table">
	  <tr> 
	  <th colspan="4" class="bighead">Forums in {$catinfo.name}</th>
	</tr>
	  <tr>
		<th width="19%" class="smallhead">Action</th>
		<th width="55%" class="smallhead">Name</th>
		<th width="26%" class="smallhead">Posts/Topics</th>
        <th class="smallhead">Position</th>
	  </tr> 
	 {section name=forums loop=$numforums}
		 <tr>
			<td class="text"><a href="{$pagename}&amp;action=editforum&amp;fid={$forums[forums].id}&amp;cid={$catinfo.id}"><img src="{$tempdir}admin/images/edit.gif" border="0" alt="Edit {$forums[forums].name}" title="Edit {$forums[forums].name}" /></a> - <a href="{$pagename}&amp;action=deleteforum&amp;fid={$forums[forums].id}"><img src="{$tempdir}admin/images/delete.gif" border="0" alt="Delete {$forums[forums].name}" title="Delete {$forums[forums].name}" /></a></td>
			<td class="text">{$forums[forums].name}<br />{$forums[forums].desc}</td>
			<td class="text">{$forums[forums].numposts} within {$forums[forums].numtopics}</td>
            <td class="text">{if $smarty.section.forums.iteration != 1}<a href="{$pagename}&amp;action=movefup&amp;fid={$forums[forums].id}&amp;cid={$catinfo.id}"><img src="{$tempdir}admin/images/up.gif" border="0" alt="Up" title="Move Up" /></a>&nbsp;{/if}{if $smarty.section.forums.iteration != $numforums}<a href="{$pagename}&amp;action=movefdown&amp;fid={$forums[forums].id}&amp;cid={$catinfo.id}"><img src="{$tempdir}admin/images/down.gif" border="0" alt="Up" title="Move Down" /></a>{/if}</td>
	  </tr>
	  {/section}
	</table>
    {else}
<div align="center">No forums in {$catinfo.name}</div>
{/if}
    <div align="left"><input type="button" class="button" onclick="window.location = '{$pagename}&amp;action=addforum&amp;cid={$catinfo.id}';" value="Add Forum" />&nbsp;<input type="button" class="button" onclick="window.location = '{$pagename}';" value="Back to Category view" /></div>
  {elseif $action=="addforum" || $action=="editforum"}
  
  <script type="text/javascript">
   {literal}
   function all(what)
   {
      if (document.getElementById(what).value == "Allow")
      {
       {/literal} 
        {section name=groups loop=$numgroups}
            document.getElementById(what + '_{$groups[groups].id}').checked=true;
        {/section}
            document.getElementById(what + '_Guest').checked=true;
        {literal}
        document.getElementById(what).value = "Disallow";
      }
      else if (document.getElementById(what).value == "Disallow")
      {
       {/literal} 
        {section name=groups loop=$numgroups}
            document.getElementById(what + '_{$groups[groups].id}').checked=false;
        {/section}
            document.getElementById(what + '_Guest').checked=false;
        {literal}
        document.getElementById(what).value = "Allow";
      }

   }
   {/literal}
      {literal}
   function accessall(what)
   {
      if (document.getElementById(what+"2").value == "Allow")
      {
        document.getElementById(what + '_admin_level').checked=true;
        document.getElementById(what + '_scouter_level').checked=true;
        document.getElementById(what + '_tl_level').checked=true;
        document.getElementById(what + '_pl_level').checked=true;
        document.getElementById(what + '_second_level').checked=true;
        document.getElementById(what+"2").value = "Disallow";
      }
      else if (document.getElementById(what+"2").value == "Disallow")
      {
        document.getElementById(what + '_admin_level').checked=false;
        document.getElementById(what + '_scouter_level').checked=false;
        document.getElementById(what + '_tl_level').checked=false;
        document.getElementById(what + '_pl_level').checked=false;
        document.getElementById(what + '_second_level').checked=false;
        document.getElementById(what+"2").value = "Allow";
      }

   }
   {/literal}
  </script>
  <form action="{$editFormAction}" method="post"  name="form1">
  <div style="text-align:center">
      Name of forum: <input name="name" type="text" id="name" size="60" maxlength="50" value="{$forum.name}" class="inputbox" />
      <br />
      Description: <input name="desc" type="text" id="desc" size="60" maxlength="50" value="{$forum.desc}" class="inputbox" />
      <br />
    </div>
    <h2>Group Permisions</h2>
    <table width="100%" cellspacing="1" cellpadding="2" class="table">
        <tr>
         <th class="smallhead">
          Groups\Permisions
         </th>
          <th class="smallhead" width="10%">
           New Topic
          </th>
          <th class="smallhead" width="10%">
           Reply to topic
          </th>          
          <th class="smallhead" width="10%">
           Edit Post
          </th>         
          <th class="smallhead" width="10%">
            Delete Post
          </th>          
          <th class="smallhead" width="10%">
           Moderate Forum
          </th>          
          <th class="smallhead" width="10%">
           View Forum
          </th>          
          <th class="smallhead" width="10%">
           Read posts in forum
          </th>  
          <th class="smallhead" width="11%">
           Sticky Posts
          </th> 
          <th class="smallhead" width="10%">
           Announcement
          </th> 
          <th class="smallhead" width="10%">
           Add Poll
          </th>           
        </tr>
        <tr>
            <td class="text"></td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('newtopic');" id="newtopic" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('reply');" id="reply" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('edit');" id="edit" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('delete');" id="delete" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('moderate');" id="moderate" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('view');" id="view" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('read');" id="read" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('sticky');" id="sticky" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('announce');" id="announce" />
            </td>        
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="all('poll');" id="poll" />
            </td>
        </tr>
        <tr>
         <td class="text">
          Guest
         </td>
          <td class="text">
           <input type="checkbox" name="newtopic_Guest" id="newtopic_Guest" value="1" {if $guest.new == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="reply_Guest" id="reply_Guest" value="1" {if $guest.reply == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="edit_Guest" id="edit_Guest" value="1" {if $guest.edit == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="delete_Guest" id="delete_Guest" value="1" {if $guest.delete == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="moderate_Guest" id="moderate_Guest" value="1" {if $guest.moderate == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="view_Guest" id="view_Guest" value="1" {if $guest.view == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="read_Guest" id="read_Guest" value="1" {if $guest.read == 1}checked="checked"{/if} class="inputbox" /> 
          </td>
          <td class="text">
           <input type="checkbox" name="sticky_Guest" id="sticky_Guest" value="1" {if $guest.sticky == 1}checked="checked"{/if} class="inputbox" /> 
          </td>
          <td class="text">
           <input type="checkbox" name="announce_Guest" id="announce_Guest" value="1" {if $guest.announce == 1}checked="checked"{/if} class="inputbox" /> 
          </td>
          <td class="text">
           <input type="checkbox" name="poll_Guest" id="poll_Guest" value="1" {if $guest.poll == 1}checked="checked"{/if} class="inputbox" /> 
          </td>
        </tr>
        {section name=groups loop=$numgroups}
        <tr>
         <td class="text">
          {$groups[groups].teamname}
         </td>
          <td class="text">
           <input type="checkbox" name="newtopic_{$groups[groups].id}" id="newtopic_{$groups[groups].id}" value="1" {if $auths[groups].new == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="reply_{$groups[groups].id}" id="reply_{$groups[groups].id}" value="1" {if $auths[groups].reply == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="edit_{$groups[groups].id}" id="edit_{$groups[groups].id}" value="1" {if $auths[groups].edit == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="delete_{$groups[groups].id}" id="delete_{$groups[groups].id}" value="1" {if $auths[groups].delete == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="moderate_{$groups[groups].id}" id="moderate_{$groups[groups].id}" value="1" {if $auths[groups].mod == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="view_{$groups[groups].id}" id="view_{$groups[groups].id}" value="1" {if $auths[groups].view == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="read_{$groups[groups].id}" id="read_{$groups[groups].id}" value="1" {if $auths[groups].read == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="sticky_{$groups[groups].id}" id="sticky_{$groups[groups].id}" value="1" {if $auths[groups].sticky == 1}checked="checked"{/if} class="inputbox" />
          </td>
           <td class="text">
           <input type="checkbox" name="announce_{$groups[groups].id}" id="announce_{$groups[groups].id}" value="1" {if $auths[groups].announce == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="poll_{$groups[groups].id}" id="poll_{$groups[groups].id}" value="1" {if $auths[groups].poll == 1}checked="checked"{/if} class="inputbox" />
          </td>
        </tr>
        {/section}
    </table>
    <h2>Administration Panel Access Level Permisions</h2>
        <table width="100%" cellspacing="1" cellpadding="2" class="table">
        <tr>
         <th class="smallhead" width="15%">
          Access Level\Permisions
         </th>
          <th class="smallhead" width="8%">
           New Topic
          </th>
          <th class="smallhead" width="8%">
           Reply to topic
          </th>          
          <th class="smallhead" width="8%">
           Edit Post
          </th>         
          <th class="smallhead" width="8%">
            Delete Post
          </th>          
          <th class="smallhead" width="8%">
           Moderate Forum
          </th>          
          <th class="smallhead" width="8%">
           View Forum
          </th>          
          <th class="smallhead" width="8%">
           Read posts in forum
          </th>  
          <th class="smallhead" width="8%">
           Sticky Posts
          </th> 
          <th class="smallhead" width="8%">
           Announcement
          </th> 
          <th class="smallhead" width="8%">
           Add Poll
          </th>           
        </tr>
        <tr>
            <td class="text"></td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('newtopic');" id="newtopic2" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('reply');" id="reply2" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('edit');" id="edit2" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('delete');" id="delete2" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('moderate');" id="moderate2" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('view');" id="view2" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('read');" id="read2" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('sticky');" id="sticky2" />
            </td>
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('announce');" id="announce2" />
            </td>        
            <td class="text">
                <input type="button" class="button" value="Allow" onclick="accessall('poll');" id="poll2" />
            </td>
        </tr>
        <tr>
         <td class="text">
          Administrator
         </td>
          <td class="text">
           <input type="checkbox" name="newtopic_admin_level" id="newtopic_admin_level" value="1" {if $auths.admin_level.new == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="reply_admin_level" id="reply_admin_level" value="1" {if $auths.admin_level.reply == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="edit_admin_level" id="edit_admin_level" value="1" {if $auths.admin_level.edit == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="delete_admin_level" id="delete_admin_level" value="1" {if $auths.admin_level.delete == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="moderate_admin_level" id="moderate_admin_level" value="1" {if $auths.admin_level.mod == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="view_admin_level" id="view_admin_level" value="1" {if $auths.admin_level.view == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="read_admin_level" id="read_admin_level" value="1" {if $auths.admin_level.read == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="sticky_admin_level" id="sticky_admin_level" value="1" {if $auths.admin_level.sticky == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="announce_admin_level" id="announce_admin_level" value="1" {if $auths.admin_level.announce == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="poll_admin_level" id="poll_admin_level" value="1" {if $auths.admin_level.poll == 1}checked="checked"{/if} class="inputbox" />
          </td>
        </tr>
        
                <tr>
         <td class="text">
          Scout Leader
         </td>
          <td class="text">
           <input type="checkbox" name="newtopic_scouter_level" id="newtopic_scouter_level" value="1" {if $auths.scouter_level.new == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="reply_scouter_level" id="reply_scouter_level" value="1" {if $auths.scouter_level.reply == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="edit_scouter_level" id="edit_scouter_level" value="1" {if $auths.scouter_level.edit == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="delete_scouter_level" id="delete_scouter_level" value="1" {if $auths.scouter_level.delete == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="moderate_scouter_level" id="moderate_scouter_level" value="1" {if $auths.scouter_level.mod == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="view_scouter_level" id="view_scouter_level" value="1" {if $auths.scouter_level.view == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="read_scouter_level" id="read_scouter_level" value="1" {if $auths.scouter_level.read == 1}checked="checked"{/if} class="inputbox" />
          </td>
         <td class="text">
           <input type="checkbox" name="sticky_scouter_level" id="sticky_scouter_level" value="1" {if $auths.scouter_level.sticky == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="announce_scouter_level" id="announce_scouter_level" value="1" {if $auths.scouter_level.announce == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="poll_scouter_level" id="poll_scouter_level" value="1" {if $auths.scouter_level.poll == 1}checked="checked"{/if} class="inputbox" />
          </td>
        </tr>
        
                <tr>
         <td class="text">
          Troop Leader/Senior PL
         </td>
          <td class="text">
           <input type="checkbox" name="newtopic_tl_level" id="newtopic_tl_level" value="1" {if $auths.tl_level.new == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="reply_tl_level" id="reply_tl_level" value="1" {if $auths.tl_level.reply == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="edit_tl_level" id="edit_tl_level" value="1" {if $auths.tl_level.edit == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="delete_tl_level" id="delete_tl_level" value="1" {if $auths.tl_level.delete == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="moderate_tl_level" id="moderate_tl_level" value="1" {if $auths.tl_level.mod == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="view_tl_level" id="view_tl_level" value="1" {if $auths.tl_level.view == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="read_tl_level" id="read_tl_level" value="1" {if $auths.tl_level.read == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="sticky_tl_level" id="sticky_tl_level" value="1" {if $auths.tl_level.sticky == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="announce_tl_level" id="announce_tl_level" value="1" {if $auths.tl_level.announce == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="poll_tl_level" id="poll_tl_level" value="1" {if $auths.tl_level.poll == 1}checked="checked"{/if} class="inputbox" />
          </td>
        </tr>
        
                <tr>
         <td class="text">
          Group Leader
         </td>
          <td class="text">
           <input type="checkbox" name="newtopic_pl_level" id="newtopic_pl_level" value="1" {if $auths.pl_level.new == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="reply_pl_level" id="reply_pl_level" value="1" {if $auths.pl_level.reply == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="edit_pl_level" id="edit_pl_level" value="1" {if $auths.pl_level.edit == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="delete_pl_level" id="delete_pl_level" value="1" {if $auths.pl_level.delete == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="moderate_pl_level" id="moderate_pl_level" value="1" {if $auths.pl_level.mod == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="view_pl_level" id="view_pl_level" value="1" {if $auths.pl_level.view == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="read_pl_level" id="read_pl_level" value="1" {if $auths.pl_level.read == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="sticky_pl_level" id="sticky_pl_level" value="1" {if $auths.pl_level.sticky == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="announce_pl_level" id="announce_pl_level" value="1" {if $auths.pl_level.announce == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="poll_pl_level" id="poll_pl_level" value="1" {if $auths.pl_level.poll == 1}checked="checked"{/if} class="inputbox" />
          </td>
        </tr>
        
        <tr>
         <td class="text">
          Assistant Group Leader
         </td>
          <td class="text">
           <input type="checkbox" name="newtopic_second_level" id="newtopic_second_level" value="1" {if $auths.second_level.new == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="reply_second_level" id="reply_second_level" value="1" {if $auths.second_level.reply == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="edit_second_level" id="edit_second_level" value="1" {if $auths.second_level.edit == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="delete_second_level" id="delete_second_level" value="1" {if $auths.second_level.delete == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="moderate_second_level" id="moderate_second_level" value="1" {if $auths.second_level.mod == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="view_second_level" id="view_second_level" value="1" {if $auths.second_level.view == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="read_second_level" id="read_second_level" value="1" {if $auths.second_level.read == 1}checked="checked"{/if} class="inputbox" />
          </td>
        <td class="text">
           <input type="checkbox" name="sticky_second_level" id="sticky_second_level" value="1" {if $auths.second_level.sticky == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="announce_second_level" id="announce_second_level" value="1" {if $auths.second_level.announce == 1}checked="checked"{/if} class="inputbox" />
          </td>
          <td class="text">
           <input type="checkbox" name="poll_second_level" id="poll_second_level" value="1" {if $auths.second_level.poll == 1}checked="checked"{/if} class="inputbox" />
          </td>
        </tr>
        <tr>
        <td colspan="11" class="text">
            <strong>Please Note:</strong> The authorization levels work like this:<strong>Either</strong> a users group, <strong>OR</strong> their access level needs to be have access to the required item. The only way for a user to not have access (To the required item) is if their access level <strong>AND</strong> group are denied access. Only a users group is looked at if they don't have access to the administration panel.
        </td>
        </tr>
    </table>
    <input type="submit" name="Submit" value="Submit" class="button" />
		<input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="history.go(-1);" class="button" />
</form>
{elseif $action=="add" || $action == "edit"}
<form name="form2" method="post" action="{$editFormAction}">
<table width = "100%">
<tr>
<td class="text" align = "center">
    Category Name: <input name="catname" size="50" value="{$cat.name}" class="inputbox" />
</td>
</tr>
<tr>
<td align="center">
    <input type="submit" name="Submit" value="Submit" class="button" id="Submit" />
    <input name="Cancel" type="button" id="Cancel" value="Cancel" onclick="history.go(-1);" class="button" />
</td>
</tr>
</table>
</form>
{elseif $action=="deleteforum"}
{if $numtopics > 0}
<div align="center"> There are still topics attached to {$forum.name}<br />
 Where do you want to move them to?<br />
 <form method="post" action="{$editFormAction}" name="form">
 <select name="forum" class="inputbox">
  <option value="del">Nowhere, just delete them</option>
  {section name=loop loop=$numforums}
   {if $forums[loop].id != $forum.id}<option value="{$forums[loop].id}">{$forums[loop].name}</option>{/if}
  {/section}
 </select><br />
 <input type="Submit" name="submit" id="submit" value="Delete" class="button" />&nbsp;<input type="button" value="Cancel" id="cancel" name="cancel" onclick="window.location = '{$pagename}&amp;action=view&amp;cid={$forum.cat}'" class="button" />
 </form></div>
{else}
 <form method="POST" action="{$editFormAction}" name="form">
<div align="center"> Do you want to delete {$forum.name}? 
 <input type="Submit" name="submit" id="submit" value="Delete" class="button" />&nbsp;<input type="button" value="Cancel" id="cancel" name="cancel" onclick="window.location = '{$pagename}&amp;action=view&amp;cid={$forum.cat}'" class="button" />
 </div></form>
 {/if}
{elseif $action=="delete"}
{if $numforums > 0}
<div align="center"> There are still forums attached to {$cat.name}<br />
 Where do you want to move them to?<br />
 <form method="post" action="{$editFormAction}" name="form">
 <select name="cats" class="inputbox">
  <option value="del">Nowhere, just delete them and their topics</option>
  {section name=loop loop=$numcats}
   {if $cats[loop].id != $cat.id}<option value="{$cats[loop].id}">{$cats[loop].name}</option>{/if}
  {/section}
 </select><br />
 <input type="Submit" name="submit" id="submit" value="Delete" class="button" />&nbsp;<input type="button" value="Cancel" id="cancel" name="cancel" onclick="window.location = '{$pagename}&amp;action=view&amp;cid={$forum.cat}'" class="button" />
 </form></div>
{else}
 <form method="post" action="{$editFormAction}" name="form">
<div align="center"> Do you want to delete {$cat.name}? 
 <input type="Submit" name="submit" id="submit" value="Delete" class="button" />&nbsp;<input type="button" value="Cancel" id="cancel" name="cancel" onclick="window.location = '{$pagename}&amp;action=view&amp;cid={$forum.cat}'" class="button" />
 </div></form>
 {/if}
{/if}
<div align="center">
 <a href="http://www.cmscout.za.net/index.php?page=subsite&amp;site=Manual&amp;content=adminpanel-forum" target="_blank">Help</a>
</div>
